#include<bits/stdc++.h>
using namespace std;

struct node{
    double x,y;
};

double cha(node n0,node n1,node n2){
    return (n1.x-n0.x)*(n2.y-n0.y)-(n1.y-n0.y)*(n2.x-n0.x);
}

double dian(node n0,node n1,node n2){
    return (n1.x-n0.x)*(n2.x-n0.x)+(n1.y-n0.y)*(n2.y-n0.y);
}

double dis(node n1,node n2){
    return (n1.x-n2.x)*(n1.x-n2.x)+(n1.y-n2.y)*(n1.y-n2.y);
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    vector<node> p(n);
    for(int i=0;i<n;i++){
        cin>>p[i].x>>p[i].y;
    }
    int res=0;
    for(int i=1;i<n;i++){
        for(int j=0;j<i;j++){
            int umid=0,dmid=0,uu=0,dd=0;
            unordered_map<double,int> un,dn;
            for(int m=0;m<n;m++){
                if(m==i||m==j||cha(p[i],p[m],p[j])==0)continue;
                else if(cha(p[i],p[m],p[j])>0){
                    if(dian(p[j],p[i],p[m])==0) un[dis(p[j],p[m])]++;
                    else if(dian(p[i],p[j],p[m])==0) un[dis(p[i],p[m])]++;
                    else if(dis(p[i],p[m])==dis(p[j],p[m])) umid++;
                }else{
                    if(dian(p[j],p[i],p[m])==0) dn[dis(p[j],p[m])]++;
                    else if(dian(p[i],p[j],p[m])==0) dn[dis(p[i],p[m])]++;
                    else if(dis(p[i],p[m])==dis(p[j],p[m])) dmid++;
                }
            }
            for(auto x:un) if(x.second==2) uu++;
            for(auto x:dn) if(x.second==2) dd++;
            res+=umid*dd+dmid*uu;
        }
    }
    cout<<res;
    return 0;
}
